import Vue from 'vue'
import Router from 'vue-router'
import page from '@/components/index'
import about from '@/components/about'
import loan from '@/components/loan'
import news from '@/components/new'
import detail from '@/components/newDetail'
import contact from '@/components/contact'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '',
      redirect: '/page'
    },
    {
      path: '/page',
      component: page
    },
    {
      path: '/about',
      component: about
    },
    {
      path: '/loan',
      component: loan
    },

    {
      path: '/new',
      component: news
      // children: [
      //   {
      //     path: 'detail',
      //     component: detail
      //   }
      // ]
    },
    {
      path: '/new/detail',
      component: detail
    },
    {
      path: '/contact',
      component: contact
    }
  ]
})
